/*==============================================================================
            Copyright (c) 2013 Moritz Hader, Marcel Schrder
            All Rights Reserved.

	@file  HeimdallNativeMesh.h

	@brief This header provides the class-definitions of the HeimdallNativeMesh.
	It provides the counter-part to the java mesh-class and capsulates the
	vertex and normal fields passed to the vertex-managementunit.
   
   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
==============================================================================*/

#ifndef _HEIMDALLNATIVEMESH_LIBRARY__
#define _HEIMDALLNATIVEMESH_LIBRARY__

#include <jni.h>

//Forward Declaration
class VertexManagementUnit;


//Counterpart to the Stock-Mesh enum in the Java-environment
enum StockMeshTypes { DEFAULT_CUBE = 0, DEFAULT_GRID, DEFAULT_CONE, DEFAULT_BARRIER, DEFAULT_TRAFFICL, DEFAULT_FANCYCAR, NONE};

class HeimdallNativeMesh{
private:
	VertexManagementUnit* vmuHandle;
	int meshType;

	void loadMesh();

public:
	HeimdallNativeMesh();
	~HeimdallNativeMesh();

	void loadVMU(VertexManagementUnit*);
	void loadJavaObject(JNIEnv* env, jobject nativeObj);
	void finalize();
	void draw();

	int getMeshType();
};

#endif
